package com.example.demo.entity.responseJson;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * @author : 洪俊新
 * @date : 2021/3/5 17:14
 * @description:
 */
@ApiModel("书籍所有章节列表返回JSON类")
public class AllChapterToBookRes {
    /**
     *主键
     * 书籍章节id
     * isnull 1
     */
    @ApiModelProperty(value="书籍章节id", position=1)
    @TableId(type = IdType.ASSIGN_ID)
    private String chapterId;

    /**
     * 章节名称
     * isnull 0
     */        @ApiModelProperty(value="章节名称(第几章+章节名称的格式)",position=2)
    private String chapterName;

    /**
     * 章节更新时间
     * isnull 0
     */        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value="章节更新时间", position=6)
    private LocalDateTime updateTime;

    /**
     * 章节是否锁定（0：未锁定；1：已锁定,默认为未锁定
     * isnull 0
     */        @ApiModelProperty(value="章节是否锁定（0：未锁定；1：已锁定,默认为未锁定",position=10)
    private Integer lockStatus;

    public String getChapterId() {
        return chapterId;
    }

    public void setChapterId(String chapterId) {
        this.chapterId = chapterId;
    }

    public String getChapterName() {
        return chapterName;
    }

    public void setChapterName(String chapterName) {
        this.chapterName = chapterName;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getLockStatus() {
        return lockStatus;
    }

    public void setLockStatus(Integer lockStatus) {
        this.lockStatus = lockStatus;
    }

    @Override
    public String toString() {
        return "AllChapterToBookRes{" +
                "chapterId='" + chapterId + '\'' +
                ", chapterName='" + chapterName + '\'' +
                ", updateTime=" + updateTime +
                ", lockStatus=" + lockStatus +
                '}';
    }
}
